package com.matt.service;

import com.matt.domain.materials.MaterielCategory;
import com.matt.domain.materials.MaterielRecords;
import com.matt.domain.materials.Materiels;
import com.matt.domain.materials.UserMateriels;
import com.matt.commons.page.PagerQuery;
import com.matt.foundation.vo.materiels.MaterielItemVO;
import org.apache.poi.util.StringUtil;
import org.springframework.data.domain.Page;

import java.util.Date;
import java.util.List;

public interface MaterialsService {

    Page<Materiels> list(String areaId, String cid, Boolean consumable, PagerQuery pagerQuery);

    List<MaterielCategory> category(String areaId);

    MaterielCategory addCategory(String areaId, String name, int sort);

    Materiels add(String areaId, String id, String cid, String name, Integer count, boolean consumable);

    Integer delete(String areaId, String id);


    //type = 1, 借出记录    type=2，归还记录    type=3，消耗记录
    Page<MaterielRecords> records(String staffId,String areaId, Integer type, String name, String operatorName, String startDate, String endDate, PagerQuery pagerQuery);

    //type = 1, 借出记录    type=2，归还记录    type=3，消耗记录
    MaterielRecords addRecord(String areaId, String operatorName, String operatorId,
                              String uid, String uname,
                              Integer type, Date date, String remark, List<MaterielItemVO> items);

    List<UserMateriels> borrow(String areaId, String uid);
}
